# Maintainer: Anri Dellal <anridellal@gmail.com>
pkgname=soc-sprd-audio
pkgver=1
pkgrel=1
pkgdesc="Audio support for Spreadtrum devices (common files)"
url="https://postmarketos.org"
arch="noarch"
license="BSD-3-Clause"
options="!check"
subpackages="$pkgname-sc8830"
source="
	asound.conf
	90-sprdphone.rules
	sc8830/sprdphone.conf
	sc8830/HiFi
	"

package() {
	install -Dm644 "$srcdir"/asound.conf "$pkgdir"/etc/asound.conf
	install -Dm644 "$srcdir"/90-sprdphone.rules "$pkgdir"/etc/udev/rules.d/90-sprdphone.rules
}

sc8830() {
	depends="soc-sprd-audio"
	install -Dm644 -t "$subpkgdir"/usr/share/alsa/ucm2/conf.d/sprdphone \
		"$srcdir"/sprdphone.conf \
		"$srcdir"/HiFi
}
sha512sums="369df19f9bf7546236b81a33c00b6384e88e979c4711fead3749f8e60f4cd99f37b31baf1f00d05a821cb71ca2f440648e13083653f1a4ec0c178c7c1c415a58  asound.conf
27479383bbbce14071bc66a3cb0abb61d62e4e044997a4a55e50de22cb27881edb27c46b5263f043ac6e03d34616b34b74127ee529636d0a570462483c378cb5  90-sprdphone.rules
350a33eff0143793c63d61697632c8936740136c1bcd55f3493526d0a3301b6bbc2381df2b4704300786ba760a8a5371c06a6ee31895e9fbcdf835deba27c314  sprdphone.conf
f6ea45936883c4b8f7a19b148cd9a3bdda02d5aba0729e93b7a190df67a3c06c64543a86f8ffca82394adca5f37f5f432307f178da67529b65be6fb2dfaf3325  HiFi"
